<div>
    <br />
    <ol class="breadcrumb">
        <li class="active">
            <span class="glyphicon glyphicon-home" style="color:#23527c"></span>&nbsp;
            <mainpage></mainpage>
        </li>
        <li class="active">运维工作台 / 参数配置管理 / 规则参数管理 / 路由通道设置</li>
    </ol>

    <ul class="nav nav-tabs marT15">
        <li role="presentation">
            <a href="#/routeServiceType" style="color: #555;">业务路由</a>
        </li>
        <li role="presentation" class="active">
            <a href="#/routePassType" style="color:#555;">通道路由</a>
        </li>
    </ul>

    <div class="rightbar">
        <form id="serviceEnd" class="showEle sign1 clearfix form-inline">
            <div class="left marT15 marR10">
                <span class="search-name">短信类型</span>
                <select class="form-control1 svrNodeName" ng-model="searchData.serviceCode" name="serviceCode">
                    <option value="">全部</option>
                    <option value={{row.serviceCode}} ng-repeat="row in listData1">{{row.serviceName}}</option>
                </select>
            </div>
            <div class="left marT15 marR10">
                <span class="search-name">通道名称</span>
                <select class="form-control1 gateLinkId" ng-model="searchData.gateLinkId" name="gateLinkId">
                    <option value="">全部</option>
                    <option value={{row.GATE_LINK_ID}} ng-repeat="row in listData2">{{row.GATE_LINK_NAME}}</option>
                </select>
            </div>
            <a href="javascript:;" class=" btn btn-sm btn-primary left marT15" id="search" ng-click='search()'>
                <span class="glyphicon glyphicon-search"></span>
            </a>
        </form>

        <div class="table-box">
            <table class="table table-bordered table-striped text-center bg-info marT15">
                <thead>
                    <tr class="info">
                        <th class="text-center">序号</th>
                        <th class="text-center">通道名称</th>
                        <th class="text-center">第一优先级业务</th>
                        <th class="text-center">第二优先级业务</th>
                        <th class="text-center">操作</th>
                    </tr>
                </thead>
                <tbody id="appList">
                    <tr ng-repeat="Item in result">
                        <td>{{ $index+1 }}</td>
                        <td class="w115">{{Item.gateLinkName}}</td>
                        <td class="w85">{{Item.firstSvrNames}}</td>
                        <td class="w70">{{Item.secondSvrNames}}</td>
                        <td style="min-width: 200px">
                            <a class="marR10" data-toggle="modal" data-target="#add" ng-click="editTr('修改',Item.gateLinkId)">修改</a>
                            <a class="marR10" data-toggle="modal" data-target="#delete" ng-click="delete(Item.gateLinkId)">删除</a>
                        </td>
                    </tr>

                </tbody>
                <tfoot>
                    <tr>
                        <td>
                            <a ng-click='editTr("添加")' class="glyphicon glyphicon-plus" data-toggle="modal" data-target="#add"></a>
                        </td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
                </tfoot>
            </table>

        </div>
        <page></page>
    </div>
</div>

<!--添加程序弹窗-->
<div class="modal fade" id="add" tabindex="-1" role="dialog" aria-labelledby="add">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="add">{{popup}}通道路由</h4>
            </div>
            <div class="modal-body">
                <div class="row marB15">
                    <div class="col-xs-6">
                        <div class="input-group  left">
                            <span class="input-group-addon">通道名称</span>
                            <select class="form-control" ng-model="addData.gateLinkId" ng-change="getServiceCode()"
                                name="gateLinkId">
                                <option value="">--请选择--</option>
                                <option value={{row.GATE_LINK_ID}} ng-repeat="row in listData2">{{row.GATE_LINK_NAME}}</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="row marB15">
                    <div class="row marB15" style="margin: 0 15px">
                        <h5>第一优先级业务: </h5>
                        <span class="checkboxSelList" id='smsSelItem'>
                            <span class='content-lists' ng-repeat="item in matData">
                                <span style='height:18px;' ng-model='addData.firstSvrIds'>
                                    <input type='checkbox' value={{item.serviceCode}} ng-click='checkboxClick1($event,$index)'
                                        sName={{item.serviceName}} ng-checked="item.isSelected" />
                                </span>
                                <label style='width: 80%;line-height: 18px;vertical-align:top;margin-bottom: 0px;overflow: hidden;padding-left: 6px;'>{{item.serviceName}}</label>
                            </span>
                        </span>
                    </div>
                </div>
                <div class="row marB15">
                    <div class="row marB15" style="margin: 0 15px">
                        <h5>第二优先级业务:</h5>
                        <span class="checkboxSelList" id='smsSelItem'>
                            <span class='content-lists' ng-repeat="item in mamData">
                                <span style='height:18px;' ng-model='addData.secondSvrIds'>
                                    <input type='checkbox' value={{item.serviceCode}} ng-click='checkboxClick2($event,$index)'
                                        sName={{item.serviceName}} ng-checked="item.isSelected" />
                                </span>
                                <label style='width: 80%;line-height: 18px;vertical-align:top;margin-bottom: 0px;overflow: hidden;padding-left: 6px;'>{{item.serviceName}}</label>
                            </span>
                        </span>
                    </div>
                    <br>
                </div>
                <!-- <div class="marB15 clearfix row">
                    <div class="col-xs-6 lineH25">
                        <label class="left">状态</label>
                        <select class="form-control line4 right" ng-model="addData.status">
                            <option value="0">失效</option>
                            <option value="1">生效</option>
                        </select>

                    </div>
                </div> -->
                <div class="marB15 clearfix row">
                    <span class="col-xs-12">
                        <label class="left"><span>路由说明：</span></label>
                        <textarea id="desc" class="left form-control" ng-model="addData.desc"></textarea>
                    </span>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary btn-sm" ng-click='editSave()'>保存</button>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 添加程序结束 -->

<!-- 提示框 -->
<div class="modal fade" id="delete">
    <div class="modal-dialog">
        <div class="modal-content message_align">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title">提示信息</h4>
            </div>
            <div class="modal-body">
                <p>您确认删除吗？</p>
            </div>
            <div class="modal-footer">
                <input type="hidden" id="url" />
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <a class="btn btn-primary" data-dismiss="modal" ng-click='deleteTr()'>确定</a>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->

<!-- 加载框 -->
<span class='loaded' ng-show='loaded'>
    <img src="img/load.gif">
</span>
<!-- 加载框 完成-->